package com.raymond.pinyougou.mapper;

import com.raymond.pinyougou.pojo.TbBrand;
import com.raymond.pinyougou.pojo.TbBrandExample;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface TbBrandMapper {
    int countByExample(TbBrandExample example);

    int deleteByExample(TbBrandExample example);

    int deleteByPrimaryKey(Long id);

    /**
     * 新增商品
     * @param record
     * @return
     */
    int insert(TbBrand record);

    int insertSelective(TbBrand record);

    /**
     * 查询所有品牌
     * @param example
     * @return
     */
    List<TbBrand> selectByExample(TbBrandExample example);

    TbBrand selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") TbBrand record, @Param("example") TbBrandExample example);

    int updateByExample(@Param("record") TbBrand record, @Param("example") TbBrandExample example);

    int updateByPrimaryKeySelective(TbBrand record);

    int updateByPrimaryKey(TbBrand record);

    /**
     * 按ID删除多个品牌
     * @param ids
     * @return
     */
    int delBrand(@Param("ids") long[] ids);

    /**
     * 品牌下拉列表
     * @return
     */
    List<Map> selectOptionList();
}